<include file="inc:header" />	
<div class="page" id='{$data.act}'>
<?php
	$this->_var['back_url'] = wap_url("index","uc_invest#index",array("id"=>$this->_var['data']['status']));
	$this->_var['back_page'] = "#uc_invest";
	$this->_var['back_epage'] = $_REQUEST['epage']=="" ? "#uc_invest" : "#".$_REQUEST['epage'];
?>
<include file="inc:title" />
<div class="content">
<!-- 这里是页面内容区 -->

<!--回款详情-->
<div class="blank15"></div>
<div class="Repayment_block_0 r-b">
	 {foreach from=$data.user_load_ids item="user_load" name="user_load" key=key} 
	<h5 class="clearfix">
			<span class="f_l">{$data.deal.name}</span>
			<a class="f_r"  href="#" onclick="RouterURL('{$data.agree_url}','#deal_contract',2);" >查看电子协议</a>

	</h5>
	
	<table>
		<tr>
			<td class="name">借款金额：</td>
			<td>{CURRENCY_UNIT|app_conf}{$user_load.money|number_format=2}</td>
		</tr>
		<tr>
			<td class="name">年利率：</td>
			<td class="specialfont ">{$data.deal.rate_foramt_w}</td>
		</tr>
		<tr>
			<td class="name">期限：</td>
			<td>{$data.deal.repay_time}<if condition="$data.deal.repay_time_type eq 0">天<else/>个月</if></td>
		</tr>
		<tr>
			<td class="name">已还本息：</td>
			<td>{CURRENCY_UNIT|app_conf}{$user_load.repay_money|number_format=2}</td>
		</tr>
		<tr>
			<td class="name">管理费：</td>
			<td>{CURRENCY_UNIT|app_conf}{$user_load.manage_fee|number_format=2}</td>
		</tr>
		<tr>
			<td class="name">利息管理费：</td>
			<td>{CURRENCY_UNIT|app_conf}{$user_load.manage_interest_money|number_format=2}</td>
		</tr>
		<tr>
			<td class="name">逾期/违约：</td>
			<td>{CURRENCY_UNIT|app_conf}{$user_load.impose_money|number_format==2}</td>
		</tr>
		<tr>
			<td class="name">还款方式：</td>
			<td>{$data.deal.loantype|loantypename}</td>
		</tr>
	</table>

</div>
<div class="blank15"></div>
<div class="Repayment_block_1">
	<div class="left_h">
		<ul>
			<li>期数</li>
			<li>还款日</li>
			<li>实际还款日</li>
			<li>待收款</li>
			<li>管理费</li>
			<li>利息管理费</li>
			<li>逾期/违约金</li>
			<li>预期收益</li>
			<li>实际收益</li>
			<li>状态</li>
		</ul>
	</div>
	<div class="r_content_list" id="r_content_list">
		<ul>
			{foreach from=$user_load.load item=loan key=key name="loans"}
			<li>
				<dl>
					<dd>第{$loan.l_key_index}期</dd>
					<dd>
					<if condition="$deal.loantype eq 0 or $deal.loantype eq 1 or $smarty.foreach.loans.last">
                	{$loan.repay_day|to_date="Y-m-d"}
					<else/>
					&nbsp;
					</if>
					</dd>
					<dd>{$loan.true_repay_time|to_date="Y-m-d"}&nbsp;</dd>
					<dd>{CURRENCY_UNIT|app_conf}{$loan.month_repay_money|number_format=2}&nbsp;</dd>
					<dd>{CURRENCY_UNIT|app_conf}{$loan.manage_money|number_format=2}&nbsp;</dd>
					<dd>{CURRENCY_UNIT|app_conf}{$loan.manage_interest_money|number_format=2}&nbsp;</dd>
					<dd>{CURRENCY_UNIT|app_conf}<if $loan.impose_money neq 0">{$loan.impose_money|number_format=2}<else/>0.00</if>&nbsp;</dd>
					<dd>{$loan.yuqi_money}&nbsp;</dd>
					<dd>{$loan.real_money}&nbsp;</dd>
					<dd>{$loan.status_format}&nbsp;</dd>
				</dl>
			</li>
			{/foreach}
		</ul>
		<div class="pre"><i class="fa fa-chevron-left"></i></div>
		<div class="next"><i class="fa fa-chevron-right"></i></div>
	</div>
</div>
<div class="blank15"></div>
<div class="Repayment_block_2 r-b">
	<if condition="$data.inrepay_info">
	<h5>因借款者在<span class="c_ff4a4a">{$data.inrepay_info.true_repay_time|to_date="Y-m-d"}</span>提前还款，故计算方式改变</h5>
	</if>
	<table>
		<tr>
			<td class="name">管理费：</td>
			<td class="c_ff4a4a">{CURRENCY_UNIT|app_conf}{$user_load.manage_fee|number_format=2}</td>
		</tr>
		<tr>
			<td class="name">利息管理费：</td>
			<td class="c_ff4a4a">{CURRENCY_UNIT|app_conf}{$user_load.manage_interest_money|number_format=2}</td>
		</tr>
		<tr>
			<td class="name">逾期/违约：</td>
			<td class="c_ff4a4a">{CURRENCY_UNIT|app_conf}{$user_load.impose_money|number_format=2}</td>
		</tr>
		<tr>
			<td class="name">本息还款：</td>
			<td class="c_ff4a4a">{CURRENCY_UNIT|app_conf}{$user_load.repay_money|number_format=2}</td>
		</tr>
	</table>
</div>
{/foreach}	
<script>
	$(document).ready(function(){
		var window_width=window.innerWidth;
		var x=(window_width-20)*0.76;	
		var y=x*0.33;
		var length=$(".Repayment_block_1 .r_content_list ul li").length*(y+1);
		var length_0=$(".Repayment_block_1 .r_content_list ul li").length;
		var img=$(".Repayment_block_1 .r_content_list ul");
      
		
		$(".Repayment_block_1 .r_content_list ul li").width(y);
		$(".Repayment_block_1 .r_content_list ul").width(length);


		
		if (length_0>3) 
		{
             $(".Repayment_block_1 .r_content_list .pre").show();
			 $(".Repayment_block_1 .r_content_list .next").show();

             $(".Repayment_block_1 .r_content_list .pre").click(function()
             {
             	img.animate({'margin-left':-y},function()           
                  {
                   img.find('li').eq(0).appendTo(img);      
                   img.css({'margin-left':0});              
                   });
             });

              $(".Repayment_block_1 .r_content_list .next").click(function()
             {
             	img.find('li:last').prependTo(img);                
		        img.css({'margin-left':-y});                       
		        img.animate({'margin-left':0});  
             });
		}
		else
		{
			$(".Repayment_block_1 .r_content_list .pre").hide();
			$(".Repayment_block_1 .r_content_list .next").hide();
		};
	});
</script>

<include file="inc:footer" />
